﻿using System.Security.Cryptography;
using System.Text;

namespace RbacPermissionManage.Common
{
    /// <summary>
    /// 帮助静态类
    /// </summary>
    public static class Helper
    {
        /// <summary>
        /// MD5加密方法
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public static string Md5(this string content)
        {
            return string.Join("", MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(content)).Select(x => x.ToString("x2")));

        }
    }
}